package model

import (
	"time"

	"gorm.io/gorm"
)

type Role struct {
	ID        int64          `gorm:"primarykey" json:"id"`
	Name      string         `gorm:"size:50;uniqueIndex;not null" json:"name"`
	Desc      string         `gorm:"size:200" json:"desc"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}

func (Role) TableName() string {
	return "roles"
}
